[#ftl]
[#--include "../../util.ftl"/--]
[@define "agile.dijit.InlineEditBox" "agile.form._LabelMixin"] [#--agile._Component,agile._Resizable--]
	category:"InlineEditBox Component"		
	,widgetName:"InlineEditBox"	
	,templateMap:{
		dojo:"<div {id} data-dojo-type='{dojoDeclaredClass}' data-dojo-props='{style-props}'>{innerWidets}</div>"
		,agile:"<div data-dojo-type='{declaredClass}' data-dojo-props='{style-props}'>{innerWidets}</div>"
	}
	,attributes:lang.delegate(agile.form._LabelMixin.prototype.attributes,{		
//		renderAsHtml:lang.mixin({},agile.BooleanMetadata,{
//			label:"i18n_render_as_html",_readOnly:true
//			,onValueChange:function(/*widget*/widget,/*String*/name,/*Object*/value){
//				widget.delegate.set(name,value);
//				widget.delegate.set("value",widget.delegate.get("value"));
//				widget.metadata(this.metadataCategory+"."+name,value);
//			}
//		})

//		,value:	lang.mixin({},agile.MultiTextMetadata,{
//			label:"i18n_text",renderAsInnerHtml:true
////			onValueChange:function(/*widget*/widget,/*String*/name,/*Object*/value){	
////				widget.delegate.reset1(name,value);
////				widget.metadata(name,value);
////			}
//			,format:function(value){
//				if(value){
//					value = value.replace(/\n/g,"<br/>");
//				}
//				return value;
//			}
//		})
		editor: lang.mixin({},agile.SelectMetadata,{
			label:"i18n_mode",_readOny:true
			,options:[{value:"dijit.form.TextBox",label:"single-line"},{value:"dijit.form.SimpleTextarea",label:"multiple-line"}]
[#--
//			 dojo.require("dijit.InlineEditBox");
//		    dojo.require("dijit.Editor");
//		    dojo.require("dijit._editor.plugins.AlwaysShowToolbar");
//			 <div data-dojo-type="dijit.InlineEditBox" editor="dijit.Editor" renderAsHtml="true"
//				 autoSave="false" editorParams="{height: '', extraPlugins: ['dijit._editor.plugins.AlwaysShowToolbar']}">
//				 </div>
--]
		})
		//,disabled:	lang.mixin({},agile.BooleanMetadata,{label:"i18n_disabled"})
//		,title: lang.mixin({},agile.TextMetadata,{
//			label:"i18n_comment"
////			onValueChange:function(/*widget*/widget,/*String*/name,/*Object*/value){	
////				widget.delegate.reset1(name,value);
////				widget.metadata(name,value);
////			}
//		})
		,name: lang.mixin({},agile.TextMetadata,{
			label:"i18n_name"			
		})
	})
	,_getDelegatePrototype:function(){
		agile.requireX("dijit/InlineEditBox");
		return dijit.InlineEditBox.prototype;
	}
	,initDefaultMetadata:function(){
		this.metadata("parameters.renderAsHtml",true);
		this.metadata("parameters.editor","dijit.form.SimpleTextarea");
		this.metadata("dojoDeclaredClass","dijit.InlineEditBox");
		this.metadata("style.width","200px");
		this.metadata("style.height","50px");
	}
[/@]
